﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Gluten.Models
{
    public class MenuSelectList
    {
        public readonly DBManager DB = new DBManager();

        public IEnumerable<SelectListItem> GetSelectList()
        {
            var menus = DB.GetAllSubmenu(Guid.Empty);
            return menus.Select(menu => new SelectListItem() 
                {Selected = false, Text = menu.Name, Value = menu.Id.ToString()});
        } 
    }
}